
#build sai dynamic lib
INCLUDE_DIRECTORIES(${SAI_SOURCE_DIR}/inc)
INCLUDE_DIRECTORIES(${SDKHOME}/sal/include)
INCLUDE_DIRECTORIES(${SDKHOME}/dal/include)
INCLUDE_DIRECTORIES(${SDKHOME}/core/init)
INCLUDE_DIRECTORIES(${SDKHOME}/core/app)
INCLUDE_DIRECTORIES(${SDKHOME}/core/common/include)
INCLUDE_DIRECTORIES(${SDKHOME}/dkits)
INCLUDE_DIRECTORIES(${SDKHOME}/core/api/include)
INCLUDE_DIRECTORIES(${SDKHOME}/core)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/inc)
AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/src SRC_LIST)

LINK_DIRECTORIES(${SAI_SOURCE_DIR}/lib/${CHIPNAME})
LINK_DIRECTORIES(${SAI_SOURCE_DIR}/lib/redis)
ADD_LIBRARY(sai SHARED ${SRC_LIST})
TARGET_LINK_LIBRARIES(sai ctcsdk)
IF(CONFIG_DBCLIENT)
    TARGET_LINK_LIBRARIES(sai geohash)
    TARGET_LINK_LIBRARIES(sai hiredis)
ENDIF(CONFIG_DBCLIENT)

SET_TARGET_PROPERTIES(sai PROPERTIES VERSION 1 SOVERSION 1.2.4)

SET(LIBRARY_OUTPUT_PATH ${SAI_SOURCE_DIR}/lib/${CHIPNAME})

MESSAGE(STATUS "This is OUT LIB dir "${LIBRARY_OUTPUT_PATH})
